package com.vincent.kdp.ui.fragment.repository;

import com.loopj.android.http.RequestParams;
import com.vincent.kdp.PostUrl;
import com.vincent.kdp.http.HttpUtil;
import com.vincent.kdp.http.RequestCallBack;
import com.vincent.kdp.ui.bean.response.BaseOutput;
import com.vincent.kdp.ui.bean.response.CommodityListOut;
import com.vincent.kdp.ui.bean.response.ShopCartListOut;
import com.vincent.kdp.util.BaseParam;

/**
 * Created by Administrator on 2017/5/22 0022.
 */

public class ShopCartRepository {
    //获取购物车
    public void reqShopCartList(RequestCallBack callBack) {
        RequestParams params = new RequestParams();
        params.put("number", BaseParam.getDeviceId());
        HttpUtil.loadData(PostUrl.GET_SHOPPINGCART, params, ShopCartListOut.class, callBack);
    }
    //删除购物车
    public void reqClearCartList(String ids, RequestCallBack callBack) {
        RequestParams params = new RequestParams();
        params.put("shoppingIds", ids);
        HttpUtil.loadData(PostUrl.CLEAR_SHOPPINGCART, params, BaseOutput.class, callBack);
    }

    //购买商品
}
